/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package rg1hammerdemo;

/**
 *
 * @author apple
 */
public class Hammer {
    
    
    private String type;
    
    public Hammer(String type)
    {
        this.type=type;
    }
    
    public String getType()
    {
        return this.type;
    }
    
    public void hit(Nail nail)
    {
        System.out.println(this.type+"正在敲"+nail.getLength()+"厘米的钉子。");
    }
}
